<script setup lang="ts">
import {testStore} from '@/store/test/index'
import { computed } from 'vue';
const store = testStore()
// 改变store 里面的count的值
const addBtn = () => {
  // store.conunt++
// store.setCount(store.conunt + 1)
// store.$patch({
//   conunt: ++store.conunt
// })
store.$patch((state) => {
  state.conunt++
})
}
// computed 取值
const count = computed(() => {
  return store.conunt
})
</script>

<template>
  <div class="mb-4">
    <el-button @click="addBtn" type="primary">Primary</el-button>
  
  </div>
  <div>{{count}}</div>
  <el-icon>
      <Edit />
    </el-icon>
 
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
